@*
    For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
*@
@model Abc.Application.SystemSettingDto
@{
}
<form class="layui-form" action="" onsubmit="return false">
    <div class="layui-form-item">
        <label class="layui-form-label">网站名称</label>
        <div class="layui-input-block">
            <input type="text" asp-for="WebName" required lay-verify="required" placeholder="请输入网站名称" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">网站域名</label>
        <div class="layui-input-block">
            <input type="text" asp-for="WebDomain" required lay-verify="required" placeholder="请输入网站域名" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">网站备案号</label>
        <div class="layui-input-block">
            <input type="text" asp-for="WebBeianNo" placeholder="请输入网站备案号" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">MATE网站关键词</label>
        <div class="layui-input-block">
            <textarea asp-for="MetaKeywords" placeholder="请输入MATE网站关键词" class="layui-textarea"></textarea>
        </div>
    </div>
    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">MATE网站描述</label>
        <div class="layui-input-block">
            <textarea asp-for="MetaDescribe" placeholder="请输入MATE网站描述" class="layui-textarea"></textarea>
        </div>
    </div>
    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">版权信息</label>
        <div class="layui-input-block">
            <textarea asp-for="CopyrightInformation" placeholder="请输入版权信息" class="layui-textarea"></textarea>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
</form>
@section scripts{
<script>
    layui.use(['tinymce', 'form'], function () {
        var form = layui.form;
        var tinymce = layui.tinymce;

        var webBeianNo=app.tinymceInit({elem:'WebBeianNo',url:'@(Url.Action("ImgUpload"))'});
        form.on('submit(formDemo)', function (obj) {
            // layer.msg(JSON.stringify(data.field));
            obj.field.WebBeianNo=webBeianNo.getContent();
            app.post({ url: "@(Url.Action("SystemSetting"))", data: obj.field})
            return false;
        });
    });
</script>
}